chore: shellui theme init + README coverage for tweakcn command#24
Merged
Conversation
Introduces a new `theme init` command that initializes ShellUI in a fresh Blazor project while applying a tweakcn theme in a single step. The command accepts various options for customization, including URL, style, and Tailwind method, enhancing user experience and simplifying theme integration. This addition complements existing theme management commands, providing a more comprehensive CLI interface for users.
…integration Expanded the README files to include comprehensive instructions on using the `shellui theme` commands for integrating tweakcn themes. Added examples for initializing a project with a theme, applying themes to existing projects, and generating standalone override CSS. Clarified the idempotent nature of theme application and how themes are recorded in `shellui.theme.lock`, improving user guidance on theme management.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #23 (tweakcn theme import). Closes the last three items on issue #21.
What ships
1.
shellui theme init <url>— one-shot init + applyCombined command for greenfield setup. Runs
InitService.InitializeAsync(Tailwind CLI download,App.razorpatch,input.css,shellui.json, MSBuild wiring) then chains intoApplyThemeAsync— so a fresh project goes from empty to fully themed in one command:Accepts the same options as
init:--force,--style,--tailwind,--yes. Console output is two labelled steps so users can see which phase they're in if something fails.Fits alongside the existing
theme apply(existing project) andtheme update(refresh from lock) — the full CLI surface is now:2. README coverage across all install-path docs
Three READMEs now cover the tweakcn workflow with concrete commands per install path:
README.mdshellui theme" section before "Theming across paths". Existing table extended with an "Auto-import from tweakcn" column showing the exact command for each path.src/ShellUI.CLI/README.mdtheme initone-shot alternative alongside plaininit. Newthemecommands section covers all three subcommands + lock file semantics.src/ShellUI.Components/README.md--emit-overrideas the recommended override workflow. Path B showstheme applyas the tweakcn auto-import path. Path C Quick Start includes thetheme initone-shot. Bottom "Theme Customization" section rewritten to lead with the CLI, keep the manual paste as fallback.3.
path-c-cli-tweakcn/demo — verified locally, not committedThe
shellui-installation-tests/directory is gitignored (per its README). Rather than land a fifth test project there that won't merge, I verified the flow end-to-end in a scratchpad:dotnet new blazor -n TestAppshellui theme init https://tweakcn.com/themes/cmgy5f2vg000504l42pep9ob1 --yesApp.razorpatched,input.css+app.css+tailwind.config.js+shellui.json+Build/ShellUI.targetscreatedinput.css,shellui.theme.lockwritten with correct SHA-256dotnet buildsucceeds; Tailwind rebuilds; components render with the tweakcn themeIssue #21 status
All checkboxes now green:
shellui theme apply <url>shellui theme apply <url> --emit-override <path>shellui theme updateshellui.theme.lockshellui theme init <url>shellui-installation-tests/are gitignored, so the user-visible surface is top-level + package READMEs)path-c-cli-tweakcn/— end-to-end demoFiles
src/ShellUI.CLI/Program.csCreateThemeInitCommand+ registration underthemeREADME.mdsrc/ShellUI.CLI/README.mdthemesubcommand sectionsrc/ShellUI.Components/README.mdNet: +143 −14 across 4 files. No behavior change to
init,apply, orupdate; no new tests needed (composition of two already-tested functions, smoke-tested end-to-end).Test plan
dotnet test— 76/76 green (unchanged; no new test surface)dotnet shellui theme --help— listsinit,apply,updatedotnet shellui theme init --help— shows<url>arg +--force / --style / --tailwind / --yesoptionsdotnet new blazorproject — both steps complete,input.csscontains@import "tailwindcss"+ BEGIN/END sentinel + 128 oklch vars,shellui.theme.lockwrittentheme inittwice — second run is idempotent within the sentinel region